home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / answrbok / 5_5.lha / 5_5 / intset.h < prev    next >
Text File  |  1993-08-08  |  486b  |  24 lines

  1. * Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
  2. * The C++ Answer Book */
  3. * Tony Hansen */
  4. * All rights reserved. */
  5. ifndef INTSET_H
  6.  define INTSET_H
  7. lass intset
  8.  
  9.    int cursize, maxsize;
  10.    int *x;
  11. ublic:
  12.    intset(int m, int n);
  13.    ~intset();
  14.    
  15.    int member(int t);
  16.    void insert(int t);
  17.    void remove(int i);
  18.    
  19.    void iterate(int &i) { i = 0; }
  20.    int ok(int& i) { return i < cursize; }
  21.    int next(int& i) { return x[i++]; }
  22. ;
  23. endif /* INTSET_H */
  24.